package com.example.demo.util;

public enum ResultCode {

  SUCCESS(200, "请求成功"),
  FAIL(400, "请求失败"),
  SERVERERROR(500, "服务器错误");

  private int code;
  private String message;

  ResultCode(int code, String message) {
    this.code = code;
    this.message = message;
  }

  public int getCode() {
    return code;
  }

  public void setCode(int code) {
    this.code = code;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  @Override
  public String toString() {
    return this.code + ":" + this.message;
  }
}
